<template>
	<view>
		<view class="content">
			<view class="titleContent" style="font-size: 18px; font-weight: 700;">热播推荐</view>
			<view class="listContent">
				<horizontal-default-item v-for="(item, index) in listData" :key="index"
				:dataInfo="item" 
				:sortNumber="index + 1"
				@clickToItem="clickToItem(item)">
				</horizontal-default-item>
			</view>
		</view>
	</view>
	
	
</template>

<script>
	import horizontalDefaultItem from '../../public/horizontal-default-item/horizontal-default-item.vue'
	export default {
		data() {
			return {
			}
		},	
		props: {
			listData: {
				type: Array,
				default: function() {
					return []
				}
			}
		},
		methods: {
			clickToItem(item) {
				this.$emit("clickToItem", item)
			}
		},
		components: {
			horizontalDefaultItem
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		display: flex;
		box-sizing: border-box;
		flex-direction: column;
		margin: 0px 15px;
			
		.listContent{
			display: flex;
			box-sizing: border-box;
			flex-direction: column;
			margin-top: 15px;
		}
		
	}
</style>